﻿Imports ZViewTVDotNet.SQLiteWrapper

Module baseScanner

    Public Function RecherchePays() As DataTable
        Dim db As SQLiteBase = New SQLiteBase
        db.OpenDatabase(ScanPath & "Scanner.db3")
        Dim sql As String = "SELECT NomPays FROM Pays"
        Dim retour As DataTable = db.ExecuteQuery(sql)
        Return retour
    End Function
    Public Function RechercheNorme() As DataTable
        Dim db As SQLiteBase = New SQLiteBase
        db.OpenDatabase(ScanPath & "Scanner.db3")
        Dim sql As String = "SELECT NomNorme FROM Norme"
        Dim retour As DataTable = db.ExecuteQuery(sql)
        Return retour
    End Function
    Public Function RechercheCanauxParPaysEtParNorme(ByVal Pays As String, ByVal norme As String) As DataTable
        Dim db As SQLiteBase = New SQLiteBase
        db.OpenDatabase(ScanPath & "Scanner.db3")

        Dim sql As String = "SELECT NomParametreCanal, Parametre " & _
        "FROM(ParametreCanal, CanauxParPays, Norme, Pays)" & _
        "WHERE(IdNorme = Id_Ext_Norme)" & _
        "and (IdParametreCanal=Id_Ext_ParametreCanal)" & _
        "and (Id_Ext_Pays=IdPays)" & _
        "and (NomPays='" & Pays & "')" & _
        "and (NomNorme='" & norme & "')"
        Dim retour As DataTable = db.ExecuteQuery(sql)
        Return retour
    End Function




End Module
